package recursion;

public class FibonacciSequenceCircle {
    public static void main(String[] args) {
        System.out.println( fibonacci(98));
    }
    public static long fibonacci(int n) {
//        int first = 1;
//        int second = 2;
//        int next;

        long a = 1;
        long b = 1;
        for (int i = 3; i <= n; i++) {
//            next = first + second;
//            first = second;
//            second = next;

            b = a + b;
            a = b - a;
        }
        return b;
    }
}
